package com.类加载器;

public class 三个类加载器 {
    public static void main(String[] args) throws ClassNotFoundException {
        ClassLoader c1=ClassLoader.getSystemClassLoader();
        System.out.println("系统类加载器");
        System.out.println(c1);
        ClassLoader c2=c1.getParent();
        System.out.println("平台类加载器");
        System.out.println(c2);
        ClassLoader c3=c2.getParent();
        System.out.println("内置类加载器");
        System.out.println(c3);
        System.out.println("- - - - - -  - - - - -  - - - - - ");
        Class<Text> cs1=Text.class;
        System.out.println(cs1);
        Class<Text> cs2=Text.class;
        System.out.println(cs1==cs2);
        System.out.println("- - - - - -  - - - - -  - - - - - ");
        Text t=new Text();
        Class<? extends Text> cs3=t.getClass();
        System.out.println(cs1==cs3);
        System.out.println("- - - - - -  - - - - -  - - - - - ");
        Class<?> cs4=Class.forName("com.类加载器.Text");
        System.out.println(cs4==cs1);





    }
}
